#include <iostream>
#include <string>

using namespace std;

int violent(string str, string searchStr);
int kmp(string str, string searchStr);
int bm(string str, string searchStr);

int main() {
    string str = "abcdabd", searchStr = "c";
    // str:violent search
    cout << violent(str, searchStr) << endl;
    // str:kmp
    cout << kmp(str, searchStr) << endl;
    // str：bm
    return 0;
}